package com.xz.knowledgeDuplication.controller;

import com.xz.knowledgeDuplication.feign.TestFeignClient;
import com.xz.knowledgeDuplication.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * feignController
 * 案例参考: https://juejin.cn/post/7078092858669924389
 *
 * @author 召
 * @date 2022-03-27 21:38:27
 */
@RestController
@RequestMapping("/feign")
@Api(description = "feign")
public class FeignController {

    @Autowired
    TestFeignClient testFeignClient;

    @GetMapping("getInfo")
    @ApiOperation("获取信息")
    public R getInfo() throws Exception {
        return testFeignClient.getInfo();
    }
}
